package com.futureCloudMOM.core.service;

import com.futureCloudMOM.core.base.service.BaseService;
import com.futureCloudMOM.core.domain.WmsBarCodeInfo;
import com.futureCloudMOM.core.domain.WmsInvoiceMain;
import com.futureCloudMOM.core.domain.WmsInvoiceSub;

import java.util.List;

/**
 * 【WMS_BarCodeInfo】的数据库操作Service
 *
 * @author Administrator
 * @since 2023-06-07 09:14:43
 */
public interface WmsBarCodeInfoService extends BaseService<WmsBarCodeInfo> {

    /**
     * 根据业务订单主子表ID 删除条码状态为-1的条码
     * @param InvoiceMainId 业务订单主表ID
     * @param InvoiceSubId  业务订单子表ID
     * @return 被删除的条码集合
     */
    void delByState(Long InvoiceMainId,Long InvoiceSubId);

    /**
     * 根据业务订单主表ID 创建条码主体
     * @param InvoiceMainId
     * @return
     */
    List<WmsBarCodeInfo> CreateBarCode(Long InvoiceMainId);


    /***
     * 根据业务订单主表ID 删除订单相关条码信息 包括条码库位和事务
     * @param InvoiceMainId
     * @return
     */
    void DelBarCode(Long InvoiceMainId);

    /**
     * 根据业务订单信息查询仓库条码 并根据条码的批次 先进先出的原则 进行备货锁定
     * @param wmsInvoiceSubs 业务订单子表数据
     * @param billTypeId    订单类型
     */
    void stockMarkerByInvoiceSub(List<WmsInvoiceSub> wmsInvoiceSubs,Long billTypeId);

}
